Intechnic
Users Developers
Home / Forums / In-Portal CMS / General In-Portal Discussions / Custom template for category and banners / Topic Posts

In-Portal Forum

This is a place for users of In-Portal to ask questions, discuss various topics, and interact with other members of the In-Portal Community. Please report bugs through the Bugs Team (not the Forum). If you are interested in contributing or joining one of the many Teams for In-Portal, please check out the Contribute section of the website.
 

In-Portal Forum

Custom template for category and banners (30)


Posted: 04/22/2005 8:06:52 AM

Reply Quoted  


Dmitry wrote:04/21/2005 10:35:02 AM
miura wrote:04/19/2005 2:24:26 AM
Hi Dmitry

Thanks for the info on adding php to tpl's - i look forward to your response on how to create tags to poulate templates (eeeeeek!)

Also thanks for the heads up on the new upgrade - andyou are righ, I'll be busy with that for a while

Have a good one.

Cheers
Brinley


Hello,

Be very careful with what you changing and add some comments around the code.

Open "kernel/parser.php" and add the following function in the end of the file before "?>":

function m_include_banner($attribs = array())
{
//     $zone getArrayValue($attribs,'_zone');

     if @include(
getenv('DOCUMENT_ROOT').'/banners/phpAdsNew/phpadsnew.inc.php'))
     {
         if !isset(
$phpAds_context))
             
$phpAds_context = array();
             
         
$phpAds_raw view_raw (''2'''''0'$phpAds_context);        
         
$ret $phpAds_raw['html'];        
     }
     
     return 
$ret;
}




Don't forget to specify correct path to your phpAdsNew system. The new tag name is <inp:m_include_banner />, which can be called from any other template. Aslo, you can pass it additional attribute, i.e. <inp:m_include_banner _Zone="1" />, but make sure to adjust the function first.

Thanks.


[Edited By Dmitry on 04/21/05 10:38:18 AM]


Hi Dmitry

Thanks for having a look into this for me and coming back with a solution.

I'll try it out this weekend

Much appreciated

Cheers
Brinley

Posted: 05/31/2005 1:39:13 PM

Reply Quoted  


Do you have an idea, when the templatesystem is ready for php-code? Because I have some scripts which I'd like to do on my homepage...
I was not really happy when I red that php is not anymore supported in inportal. Because it was no problem in inlink2 and for me it was no question, that all features from inlink2 will also be in inportal and inlink3.

Greetings

Roland

Posted: 05/31/2005 2:31:47 PM

Reply Quoted  


linkit.ch wrote:05/31/2005 1:39:13 PM
Do you have an idea, when the templatesystem is ready for php-code? Because I have some scripts which I'd like to do on my homepage...
I was not really happy when I red that php is not anymore supported in inportal. Because it was no problem in inlink2 and for me it was no question, that all features from inlink2 will also be in inportal and inlink3.

Greetings

Roland


Hello Gerard,

We are planning to add PHP support in the future releases.

Thanks.

Posted: 06/01/2005 9:02:54 PM

Reply Quoted  


Dmitry wrote:11/08/2004 6:57:01 PM
Hello gerard,

In regards of custom templates for categories. As you must know, the default category item template "default/category/item_template.tpl" has the following code/tag which returns the category link

<A href="<inp:cat _field="link" />"><inp:cat _Field="Name" /></a>



In order to have a custom category template automatically built-in instead of the default one you'll have to make some template changes.

First, you need to create a category custom field called "indextemplate" and store whichever template name you plan to use in that field. For example, you create a custom template 1.tpl and store it in "indextemplate" category custom field as "1.tpl". The template should be placed under "themes/default/" folder. Of course you can create subfilders and store your custom templates there.

Second, change the above code to this:

<A href="<inp:cat _field="customlink" />"><inp:cat _Field="Name" /></a>



This should for for you just fine.

Thank you.


This also applies to In-Newz? Thanks.

Posted: 06/02/2005 9:35:49 AM

Reply Quoted  


micantina wrote:06/01/2005 9:02:54 PM
Dmitry wrote:11/08/2004 6:57:01 PM
Hello gerard,

In regards of custom templates for categories. As you must know, the default category item template "default/category/item_template.tpl" has the following code/tag which returns the category link

<A href="<inp:cat _field="link" />"><inp:cat _Field="Name" /></a>



In order to have a custom category template automatically built-in instead of the default one you'll have to make some template changes.

First, you need to create a category custom field called "indextemplate" and store whichever template name you plan to use in that field. For example, you create a custom template 1.tpl and store it in "indextemplate" category custom field as "1.tpl". The template should be placed under "themes/default/" folder. Of course you can create subfilders and store your custom templates there.

Second, change the above code to this:

<A href="<inp:cat _field="customlink" />"><inp:cat _Field="Name" /></a>



This should for for you just fine.

Thank you.


This also applies to In-Newz? Thanks.


It applies to the entire system.

Thanks.

Posted: 06/03/2005 1:53:37 AM

Reply Quoted  


Got it working... Thanks.

Posted: 06/10/2005 12:49:46 AM

Reply Quoted  


[quote]In regards to Banner Module and phpAdsNew banner system, we've done a lot of integration within our previous In-link2 system. We'll certainly do a big research on this kind of systems first.[/quote]

You might want to check out AdPeeps
http://www.adpeeps.com/

It is MUCH easier to use than phpadsnew, has the features that most people want, and is very scalable/stable. We were using phpadsnew, but the user interface was ridiculously clunky and very confusing..

Posted: 06/14/2005 4:22:43 PM

Reply Quoted  


I have to input some php-code like...

include(„http://james.adbutler.de/poplink.php?pid=8725&tid=96501&bid=38902&uid=132255“);

or

include(„http://james.adbutler.de/poplink.php?pid=8787&tid=96501&bid=38581&uid=132255“);

Do I have to create for each "include" an own tag or is there another way?

Thanks

Roland

Posted: 06/17/2005 4:22:45 PM

Reply Quoted  


linkit.ch wrote:06/14/2005 4:22:43 PM
I have to input some php-code like...

include(„http://james.adbutler.de/poplink.php?pid=8725&tid=96501&bid=38902&uid=132255“);

or

include(„http://james.adbutler.de/poplink.php?pid=8787&tid=96501&bid=38581&uid=132255“);

Do I have to create for each "include" an own tag or is there another way?

Thanks

Roland


Would be great, if anybody could give me an answer on this question. Thanks.

Posted: 06/20/2005 11:31:30 AM

Reply Quoted  


linkit.ch wrote:06/17/2005 4:22:45 PM
linkit.ch wrote:06/14/2005 4:22:43 PM
I have to input some php-code like...

include(„http://james.adbutler.de/poplink.php?pid=8725&tid=96501&bid=38902&uid=132255“);

or

include(„http://james.adbutler.de/poplink.php?pid=8787&tid=96501&bid=38581&uid=132255“);

Do I have to create for each "include" an own tag or is there another way?

Thanks

Roland


Would be great, if anybody could give me an answer on this question. Thanks.


Sorry for delay Roland, I just missed this topic.

You can create one new tag and pass actual file/URL you want to include as an attribute, so your template would look like this after you added the tag itself:

<inp:m_include_file _File="http://james.adbutler.de/poplink.php?pid=8725&tid=96501&bid=38902&uid=132255" />

I hope this make sense.

Thanks,


[Edited By Dmitry on 06/20/05 11:41:41 AM]

[Edited By Dmitry on 06/21/05 6:21:08 AM]

Page:     1 2 3